package com.wuh.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.PageInfo;
import com.wuh.model.ArticleType;
import com.wuh.model.Collect;
import com.wuh.model.Read;
import com.wuh.model.Teacher;
import com.wuh.model.Toefl;
import com.wuh.model.User;

@Mapper
public interface ToeflMapper {

	List<Toefl> titlelist(Toefl toefl);

	List<Toefl> titlelist2(Toefl toefl);

	List<Toefl> titlelist3(Toefl toefl);

	List<Toefl> titlelist4(Toefl toefl);

	List<Toefl> titlelist5(Toefl toefl);

	List<Toefl> titlelist6(Toefl toefl);

	List<Toefl> titlelist7(Toefl toefl);

	List<Toefl> titlelist8(Toefl toefl);

	List<Toefl> getClassByat(Integer activity_type);

	Toefl getArticleByai(Integer article_id);

	int getCommentsumbyid(Integer article_id);

	List<Toefl> getComent(Integer article_id);

	int updateCollect(@Param("ai")Integer article_id,@Param("cu")Integer collect_user,@Param("lm") Date lm, Collect collect);

	User getIdByname(String login_name);

	int getCollectsum(Integer article_id);

	int editArticle(@Param("sum")int sum,@Param("ai") Integer article_id);

	List<Toefl> collectListBycu(Integer collect_user);

	List<Toefl> lastArticleList(Toefl toefl);

	Teacher getIdBytname(String a);

	List<Toefl> getArticleBytid(Integer publish_teacher);

	int delArticleByid(Integer article_id);

	int delArticleByid1(Integer article_id);

	int delArticleByid2(Integer article_id);

	int delArticleByid3(Integer article_id);

	int addAtricle(Toefl toefl);

	int editAtricle(Toefl toefl);

	List<Toefl> schall(Toefl toefl);

	List<Toefl> articleClass(Integer article_type);

	int banArticles(Integer id);

	int unlashArticles(Integer id);

	List<Teacher> schTeachers();

	List<ArticleType> schArticleTypes();

	int updateComment(@Param("ai")Integer article_id,@Param("desc") String desc,@Param("cu") Integer comment_user,@Param("pt") Integer publish_teacher,@Param("lm") Date lm);

	int updateRead(@Param("ai")Integer article_id,@Param("ru") Integer read_user,@Param("lm") Date lm, Read read);

	int getReadsum(Integer article_id);

	int editRead(@Param("sum")int sum, @Param("ai")Integer article_id);

}
